<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset='utf8'>
</head>
<body>

</body>
<script>
  var list = ['静静','贱贱','熙熙','哈哈','舒舒','艳艳','波波'];

  //for
  for (var i=0;i<list.length;i++){
    console.log(i,list[i]);
  }
  document.write('<hr>');

  //for in
  for(var i  in list)
  {
    console.log(i,list[i]);
  }

  //遍历对象
  var obj = {name:'卡卡',age:40,sex:' 男'};
  for(var i in obj)
  {
    console.log(i,list[i]);
  }
</script>
</html>